/**
 * Created by xie on 2018/4/12.
 */
angular.module('service.personalcenter', [
    'ngResource',
    'ngCookies'
])

    .service('PersonalcenterService', ['$http', '$resource', '$cookies',
        function ($http, $resource, $cookies) {

            this.getDissByUserid=function (userid,success,error) {
                var resource = $resource(plantUrl + "diss/getinfobyuserid");
                return resource.query({userid:userid},success,error)
            }

            this.deleteDissByKey = function (articleid,userid,success,error) {
                var resource = $resource(plantUrl + "diss/deleteinfo");
                return resource.remove({articleid:articleid,userid:userid},success,error)
            }

            this.getCommentByUserid=function (userid,success,error) {
                var resource = $resource(plantUrl + "Comment/getbyuserid");
                return resource.query({userid:userid},success,error)
            }

            this.deleteCommentById = function (commentid,success,error) {
                var resource = $resource(plantUrl + "Comment");
                return resource.remove({commentid:commentid},success,error)
            }
        }])